package com.ebupt.migu.music.commons.constants;

import com.alibaba.fastjson.JSONObject;
import lombok.Data;

/**
 * @author tz
 */
@Data
public class ResultMsg<T> {

    /**
     * 返回编码
     **/
    private String code = "0000";
    /**
     * 返回信息
     **/
    private String message = "SUCCESS";
    /**
     * 数据
     */
    private T data;

    /**
     * to Json
     *
     * @return
     */
    public String toJson(){
        JSONObject object = new JSONObject();
        return object.toJSONString();
    }

}
